#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <assert.h>

char* my_strstr(const char* arr1, const char* arr2)
{
	const char* s1 = arr1;
	const char* s2 = arr2;
	const char* p = arr1;
	while (*s1)
	{
		s1 = p;
		s2 = arr2;
		while (*s1 == *s2)
		{
			s1++;
			s2++;
		}
		if (*s2 == '\0')
		{
			return p;
		}
		p++;
	}
	return NULL;
}

int main()
{
	char arr1[] = "abbbcdef";
	char arr2[] = "bbc";
	char* pp = my_strstr(arr1, arr2);
	printf("%s", pp);
	return 0;
}